pub fn dp_rec_mc(amount: u32) -> u32 {
    let coins = [1, 2, 5, 10, 20, 30, 50, 100]; // 可用纸币面额
    let amount = amount as usize; // 转为 usize 方便数组索引

    // 初始化 dp 数组，设置一个大值作为初始值
    let mut dp = vec![u32::MAX; amount + 1];
    dp[0] = 0; // 金额为 0 时，纸币数为 0

    // 动态规划求解
    for i in 1..=amount {
        for &coin in &coins {
            if i >= coin as usize {
                dp[i] = dp[i].min(dp[i - coin as usize] + 1);
            }
        }
    }

    // 返回结果
    dp[amount]
}

